package com.ujoin.action.user;

import org.springframework.beans.factory.annotation.Autowired;

import com.ujoin.util.ActionEnhanced;
import com.ujoin.bean.User;
import com.ujoin.service.UserService;

@SuppressWarnings("serial")
public class RegisterAction extends ActionEnhanced {

	@Autowired
	private UserService userService;
	private User user;
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String execute() throws Exception {
		setJson(userService.register(user));
		return SUCCESS;
	}
}
